var dialog={
	openDialog : function (_cfg){
		_cfg.skin='layui-layer-lan';
		//_cfg.scrollbar=false,
		_cfg.type=1;
		_cfg.maxWidth = $(window).width();
		return layer.open(_cfg);
		
	},openDialogHasHead : function (_cfg){//layer有头，设置×
		_cfg.skin='layui-layer-littleTree';//'layui-layer-lan';
		_cfg.type=1;
		_cfg.maxWidth = $(window).width();
		_cfg.zIndex=20000;
		_cfg.closeBtn = 1;
		return layer.open(_cfg);
	},
	openDialogFullScreen : function(_cfg){
		_cfg.type = 1;
		//新增注释
		_cfg.area = ['1000px', '650px'];
		_cfg.maxmin =  true;
		return layer.open(_cfg);
	},
	openDialog1 : function (_cfg){
		_cfg.skin='layui-layer-lan';
		//_cfg.scrollbar=false,
		_cfg.type=1;
		_cfg.maxWidth = $(window).width();
		_cfg.closeBtn = 1;
		return layer.open(_cfg);

	},
    error : function (msg,_time){
        if(!_time){
            _time = 1000;//毫秒
        }
        layer.msg(msg, {icon: 5,time: _time });
    },
    notice : function (msg,_time){
        if(!_time){
            _time = 1000;//毫秒
        }
        layer.msg(msg, {icon: 7,time: _time });
    },
	success : function (msg,_time){
		if(!_time){
			_time = 1000;//毫秒
		}
		layer.msg(msg, {icon: 6,time: _time }); 
	},
	closeAll : function (type){
		if(type){
			layer.closeAll(type)
		}else{
			layer.closeAll()
		}
	},
	close : function (index){
		if(index){
			layer.close(index);
		}else{
			layer.closeAll();
		}
	},
	load : function (index){
		if(index){
			return layer.load(index);
		}else{
			return layer.load();
		}
	},
	alert:function(msg){
		return layer.alert(msg, {
			icon: 0,
			scrollbar: false,
			skin: 'layui-layer-lan'
		});
	},
	alert:function(msg,method){
		return layer.alert(msg, {
			icon: 0,
			scrollbar: false,
			skin: 'layui-layer-lan'
		},method);
	},
	confirm:function(msg,method){
		return layer.confirm(msg,{
			scrollbar: false,
			skin: 'layui-layer-lan'
		},function(index){
			method();
			layer.close(index);
		});
	}
}

